<div class="wraper" js="wapjs/meeting/js/choiceuser">
    <div class="head clearfix">
        <a href="javascript:void(0);" class="iconfont icon-zuo hide-search"></a>
        <span class="head-name">选择审核人员</span>
    </div>

    <div class="search">
        <p class="tips-text text-gray text-center"><span class='iconfont icon-sousuo'></span>搜索名字、拼音、手机号</p>
        <input class="search-input" name="search" value=""/>
    </div>

    <if condition="$data">
        <!--<div class="lists">
            <div class="list-line">
                <span class="iconfont icon-xuanze" id="select-all-search"></span> 全选
            </div>
        </div>-->
        <div class="lists" id="list">

                <foreach name="data" item="vo">
                    <div class="list-line tb-mode">
                        <div class="tb-cell check-box" data-id="{BEESCRM:$vo.user_id}"><span class="iconfont icon-xuanze" data-id="{BEESCRM:$vo.user_id}" v="{BEESCRM:$vo.user_id}"></span></div>
                        <div class="tb-cell small-photo"><img src="<if condition="!empty($vo['avatar'])">{BEESCRM:$vo.avatar}<else/>/assets/meeting/images/photo.jpg</if>"/></div>
                        <div class="tb-cell">{BEESCRM:$vo.real_name}</div>
                    </div>
                </foreach>
        </div>
    <else />
        <div class="lists" id="">
            <div class="tb-cell" style="text-align:center;">暂无结果~</div>
        </div>
    </if>

    <div class="fixed-total">
        <div class="tb-mode">
            <input type="hidden" value="{BEESCRM:$edit}" id="edit">
            <div class="tb-cell"><a href="javascript:void(0);" class="btn pull-right bg-green sure-checker">确定</a></div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<script type="text/javascript" src="/assets/public/jquery-2.1.0.min.js"></script>
<script>
    $('#select-all-search').click(function(){
        if($(this).hasClass('icon-xuanze1')){
            $(this).addClass('icon-xuanze').removeClass('icon-xuanze1');
            $('#list .iconfont').addClass('icon-xuanze').removeClass('icon-xuanze1');
        }else{
            $(this).addClass('icon-xuanze1').removeClass('icon-xuanze');
            $('#list .iconfont').addClass('icon-xuanze1').removeClass('icon-xuanze');
        }
    })
    $(document).on('click','.hide-search',function() {
        $(".search-result").css('display','none');
        $(".show-search").css('display','block');
    })


    $(document).on('click','.sure-checker',function() { //选择审核人员、确定
        var account_id = "{BEESCRM:$accountId}";
        var data = {};
        data.user_id = $("#list .list-line .check-box .icon-xuanze1").data('id');
        data.basicId = $("#basicId").val();
        data.level = $("#level").val();
        if(!data.user_id) {
            fm.alert('请选择审核人员~');return false;
        }
        console.log(account_id);
        var s = "/meeting/meetingAppoint/appointAudited/account_id/" + account_id + "/user_id/"+data.user_id+"/basic_id/"+data.basicId+"/level/"+data.level;
        console.log(s);
        window.location.href = s;
    });
</script>
